package com.cyf.utils.sunpos;

public class PosData {

    /***** ALPHABETICAL LIST OF COMMON VARIABLES *****/
                           /* Each comment begins with a 1-column letter code:
                              I:  INPUT variable
                              O:  OUTPUT variable
                              T:  TRANSITIONAL variable used in the algorithm,
                                  of interest only to the solar radiation
                                  modelers, and available to you because you
                                  may be one of them.

                              The FUNCTION column indicates which sub-function
                              within solpos must be switched on using the
                              "function" parameter to calculate the desired
                              output variable.  All function codes are
                              defined in the solpos.h file.  The default
                              S_ALL switch calculates all output variables.
                              Multiple functions may be or'd to create a
                              composite function switch.  For example,
                              (S_TST | S_SBCF). Specifying only the functions
                              for required output variables may allow solpos
                              to execute more quickly.

                              The S_DOY mask works as a toggle between the
                              input date represented as a day number (daynum)
                              or as month and day.  To set the switch (to
                              use daynum input), the function is or'd; to
                              clear the switch (to use month and day input),
                              the function is inverted and and'd.

                              For example:
                                  pdat->function |= S_DOY (sets daynum input)
                                  pdat->function &= ~S_DOY (sets month and day input)

                              Whichever date form is used, S_solpos will
                              calculate and return the variables(s) of the
                              other form.  See the soltest.c program for
                              other examples. */

  /* VARIABLE        I/O  Function    Description */
  /* -------------  ----  ----------  ---------------------------------------*/

    public int day;       /* I/O: S_DOY      Day of month (May 27 = 27, etc.)
                                        solpos will CALCULATE this by default,
                                        or will optionally require it as input
                                        depending on the setting of the S_DOY
                                        function switch. */
    public int daynum;    /* I/O: S_DOY      Day number (day of year; Feb 1 = 32 )
                                               solpos REQUIRES this by default, but
                                               will optionally calculate it from
                                               month and day depending on the setting
                                               of the S_DOY function switch. */
    public int function;  /* I:              Switch to choose functions for desired
                                               output. */
    public int hour;      /* I:              Hour of day, 0 - 23, DEFAULT = 12 */
    public int interval;  /* I:              Interval of a measurement period in
                                               seconds.  Forces solpos to use the
                                               time and date from the interval
                                               midpoint. The INPUT time (hour,
                                               minute, and second) is assumed to
                                               be the END of the measurement
                                               interval. */
    public int minute;    /* I:              Minute of hour, 0 - 59, DEFAULT = 0 */
    public int month;     /* I/O: S_DOY      Month number (Jan = 1, Feb = 2, etc.)
                                               solpos will CALCULATE this by default,
                                               or will optionally require it as input
                                               depending on the setting of the S_DOY
                                               function switch. */
    public int second;    /* I:              Second of minute, 0 - 59, DEFAULT = 0 */
    public int year;      /* I:              4-digit year (2-digit year is NOT
                                              allowed */

    /***** doubleS *****/

    public double amass;      /* O:  S_AMASS    Relative optical airmass */
    public double ampress;    /* O:  S_AMASS    Pressure-corrected airmass */
    public double aspect;     /* I:             Azimuth of panel surface (direction it
                                               faces) N=0, E=90, S=180, W=270,
                                               DEFAULT = 180 */
    public double azim;       /* O:  S_SOLAZM   Solar azimuth angle:  N=0, E=90, S=180,
                                               W=270 */
    public double cosinc;     /* O:  S_TILT     Cosine of solar incidence angle on
                                              panel */
    public double coszen;     /* O:  S_REFRAC   Cosine of refraction corrected solar
                                              zenith angle */
    public double dayang;     /* T:  S_GEOM     Day angle (daynum*360/year-length)
                                               degrees */
    public double declin;     /* T:  S_GEOM     Declination--zenith angle of solar noon
                                               at equator, degrees NORTH */
    public double eclong;     /* T:  S_GEOM     Ecliptic longitude, degrees */
    public double ecobli;     /* T:  S_GEOM     Obliquity of ecliptic */
    public double ectime;     /* T:  S_GEOM     Time of ecliptic calculations */
    public double elevetr;    /* O:  S_ZENETR   Solar elevation, no atmospheric
                                              correction (= ETR) */
    public double elevref;    /* O:  S_REFRAC   Solar elevation angle,
                                              deg. from horizon, refracted */
    public double eqntim;     /* T:  S_TST      Equation of time (TST - LMT), minutes */
    public double erv;        /* T:  S_GEOM     Earth radius vector
                                               (multiplied to solar constant) */
    public double etr;        /* O:  S_ETR      Extraterrestrial (top-of-atmosphere)
                                              W/sq m global horizontal solar
                                              irradiance */
    public double etrn;       /* O:  S_ETR      Extraterrestrial (top-of-atmosphere)
                                              W/sq m direct normal solar
                                              irradiance */
    public double etrtilt;    /* O:  S_TILT     Extraterrestrial (top-of-atmosphere)
                                               W/sq m global irradiance on a tilted
                                               surface */
    public double gmst;       /* T:  S_GEOM     Greenwich mean sidereal time, hours */
    public double hrang;      /* T:  S_GEOM     Hour angle--hour of sun from solar noon,
                                                degrees WEST */
    public double julday;     /* T:  S_GEOM     Julian Day of 1 JAN 2000 minus
                                               2,400,000 days (in order to regain
                                               single precision) */
    public double latitude;   /* I:             Latitude, degrees north (south negative) */
    public double longitude;  /* I:             Longitude, degrees east (west negative) */
    public double lmst;       /* T:  S_GEOM     Local mean sidereal time, degrees */
    public double mnanom;     /* T:  S_GEOM     Mean anomaly, degrees */
    public double mnlong;     /* T:  S_GEOM     Mean longitude, degrees */
    public double rascen;     /* T:  S_GEOM     Right ascension, degrees */
    public double press;      /* I:             Surface pressure, millibars, used for
                                                refraction correction and ampress */
    public double prime;      /* O:  S_PRIME    Factor that normalizes Kt, Kn, etc. */
    public double sbcf;       /* O:  S_SBCF     Shadow-band correction factor */
    public double sbwid;      /* I:             Shadow-band width (cm) */
    public double sbrad;      /* I:             Shadow-band radius (cm) */
    public double sbsky;      /* I:             Shadow-band sky factor */
    public double solcon;     /* I:             Solar constant (NREL uses 1367 W/sq m) */
    public double ssha;       /* T:  S_SRHA     Sunset(/rise) hour angle, degrees */
    public double sretr;      /* O:  S_SRSS     Sunrise time, minutes from midnight,
                                                local, WITHOUT refraction */
    public double ssetr;      /* O:  S_SRSS     Sunset time, minutes from midnight,
                                                local, WITHOUT refraction */
    public double temp;       /* I:             Ambient dry-bulb temperature, degrees C,
                                                used for refraction correction */
    public double tilt;       /* I:             Degrees tilt from horizontal of panel */
    public double timezone;   /* I:             Time zone, east (west negative).
                                            USA:  Mountain = -7, Central = -6, etc. */
    public double tst;        /* T:  S_TST      True solar time, minutes from midnight */
    public double tstfix;     /* T:  S_TST      True solar time - local standard time */
    public double unprime;    /* O:  S_PRIME    Factor that denormalizes Kt', Kn', etc. */
    public double utime;      /* T:  S_GEOM     Universal (Greenwich) standard time */
    public double zenetr;     /* T:  S_ZENETR   Solar zenith angle, no atmospheric
                                              correction (= ETR) */
    public double zenref;     /* O:  S_REFRAC   Solar zenith angle, deg. from zenith,
                                        refracted */
}
